package com.jie.component.validation.annotion;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author jie
 * @version 1.0 2025-02-13
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Password {

    /**
     * 密码格式的正则
     * @return
     */
    String regex() default "^[a-zA-Z0-9]{8,}$";

    String message() default "";

    boolean required() default true;
}
